package java19_3_22_reflect;

//public enum TestEnum {
//    RED,BLACK,GREEN,WHITE;
//    public static void main(String[] args) {
//        TestEnum[] testEnum2 =  TestEnum.values();
//        for (int i = 0; i < testEnum2.length; i++) {
//            System.out.println(testEnum2[i] + " " + testEnum2[i].ordinal());
//        }
//        System.out.println("=========================");
//        System.out.println(TestEnum.valueOf("GREEN"));
//    }
//}
public enum TestEnum {
    RED,BLACK,GREEN,WHITE;
    public static void main(String[] args) {
        TestEnum testEnum2 = TestEnum.BLACK;
        switch (testEnum2) {
            case RED:
                System.out.println("red");
                break;
            case BLACK:
                System.out.println("black");
                break;
            case WHITE:
                System.out.println("WHITE");
                break;
            case GREEN:
                System.out.println("blac");
                break;
            default:
                break; }
    } }